<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>员工信息管理</title>
</head>
<link rel="stylesheet" type="text/css" href="/wms/js/plugins/jquery-easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="/wms/js/plugins/jquery-easyui/themes/icon.css">
<script type="text/javascript" src="/wms/js/plugins/jquery-easyui/jquery.min.js"></script>
<script type="text/javascript" src="/wms/js/plugins/jquery-easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/wms/js/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="/wms/js/common/common.js"></script>
<script type="text/javascript" src="/wms/js/common/employee.js"></script>
<%@include file="/WEB-INF/views/common/page.jsp" %>
<body class="easyui-layout">
		<s:if test="hasActionMessages()">
			<script type="text/javascript">
				var msg = '<s:property value="actionMessages[0]"/>';
				$.messager.alert('操作提示', msg, 'info',function() {
					refreshAllTab();
				});
			</script>
		</s:if>
		<div data-options="region:'north',border:false" style="height: 10%">
			<form id="queryForm" method="post" action="/wms/employee.action" style="margin-top: 15px">
			<s:hidden name="qo.currentPage"/>
			<s:hidden name="qo.pageSize"/>
			用户名/邮箱&nbsp;<s:textfield name="qo.keyword" />
			&nbsp; 
			部门&nbsp;<s:select name="qo.deptId" list="#depts" listKey="id" listValue="name" headerKey="-1" headerValue="全部"></s:select>&nbsp;
			<a class="easyui-linkbutton" data-options="text:'查询',iconCls:'icon-search'" onclick="query()"></a>
			</form>
		</div>
		<div data-options="region:'south',border:false" style="height: 90%">
			<table id="table_datagrid">
				<thead>
					<tr>
						<th data-options="field:'id',align:'center'">编号</th>
						<th data-options="field:'name',width:1,align:'center'">姓名</th>
						<th data-options="field:'email',width:1,align:'center'">邮箱</th>
						<th data-options="field:'age',width:1,align:'center'">年龄</th>
						<th data-options="field:'dept.name',width:1,align:'center'">所属部门</th>
						<th data-options="field:'roleName',width:1,align:'center'">角色</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="#objs">
						<tr>
							<td><s:property value="id" /></td>
							<td><s:property value="name" /></td>
							<td><s:property value="email" /></td>
							<td><s:property value="age" /></td>
							<td><s:property value="dept.name" /></td>
							<td><s:property value="roleName" /></td>
						</tr>
					</s:iterator>
				</tbody>
			</table>
			<div id="dg_tb" style="display: none">
				<a class="easyui-linkbutton" data-options="text:'添加',iconCls:'icon-add',plain:true,onClick:add" data-url="/wms/employee_input.action"></a>
				<a class="easyui-linkbutton" data-options="text:'编辑',iconCls:'icon-edit',plain:true,onClick:edit" data-url="/wms/employee_input.action?employee.id="></a>
				<a class="easyui-linkbutton" data-options="text:'删除',iconCls:'icon-remove',plain:true,onClick:remove" 
				data-url="/wms/employee_delete.action?employee.id="></a> 
				<a class="easyui-linkbutton" data-options="text:'刷新',iconCls:'icon-reload',plain:true,onClick:query"></a>
			</div>

		</div>
</body>
</html>
